﻿using System.Linq.Expressions;

using Tszy.Unlimited.Data.AdoNet.Sql.Components.Expressions.Values.Handlers;

namespace Tszy.Unlimited.Data.AdoNet.Sql.Components.Expressions.Values
{
    /// <summary>
    /// 参数变量处理器。
    /// </summary>
    /// <remarks>
    /// 从表达式中提取出对应的参数或者变量信息。
    /// </remarks>
    internal class ValueExpressionHandler
    {
        private static readonly IValueExpressionHandler _valueHandler = new DefaultValueExpressionHandler();

        public static ValueExpressionHandler Instance = new();

        public static ValueExpressionResult Handler(ExpressionContext context, Expression expression)
        {
            return _valueHandler.Handler(context, expression);
        }
    }
}